package com.zhc.dejingapi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhc.dejingapi.entity.QingZbProcesswithrouteEntity;
import com.zhc.dejingapi.mapper.QingZbProcesswithrouteMapper;
import com.zhc.dejingapi.service.QingZbProcesswithrouteService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhc
 * @since 2024-09-11
 */
@Service
public class QingZbProcesswithrouteServiceImpl extends ServiceImpl<QingZbProcesswithrouteMapper, QingZbProcesswithrouteEntity> implements QingZbProcesswithrouteService {

    @Resource
    private QingZbProcesswithrouteMapper qingZbProcesswithrouteMapper;
    @Override
    public void updateProcessWithRoute(Long mainId, String standardWorkingHour) {
        QueryWrapper<QingZbProcesswithrouteEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("main_id",mainId);
        QingZbProcesswithrouteEntity qingZbProcesswithrouteEntity = new QingZbProcesswithrouteEntity();
        qingZbProcesswithrouteEntity.setStandardWorkingHour(Integer.parseInt(standardWorkingHour));
        qingZbProcesswithrouteMapper.update(qingZbProcesswithrouteEntity, queryWrapper);
    }
}
